<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'install-form',
    'enableClientValidation' => false,
    'clientOptions' => array(
        'validateOnSubmit' => true,
    ),
    'htmlOptions' => array(
        'class' => 'form-signin'
    ),
        ));
?>



<h3 class="form-signin-heading text-center">MemeMakerScript.com Installer</h3>
<hr>
<?php foreach ($writable_errors as $error): ?>
    <div class="alert alert-danger">
        <?php echo $error ?>
    </div>
<?php endforeach; ?>

<h5 class="text-center">Application</h5>

<?php echo $form->labelEx($model, 'app_name'); ?>
<?php echo $form->textField($model, 'app_name', array('class' => 'input-block-level', 'placeholder' => 'Application name')) ?>
<span class="help-block error"><?php echo $form->error($model, 'app_name'); ?></span>

<h5 class="text-center">Admin Details</h5>

<?php echo $form->labelEx($model, 'admin_username'); ?>
<?php echo $form->textField($model, 'admin_username', array('class' => 'input-block-level', 'placeholder' => 'Admin username')) ?>
<span class="help-block error"><?php echo $form->error($model, 'admin_username'); ?></span>

<?php echo $form->labelEx($model, 'admin_password'); ?>
<?php echo $form->passwordField($model, 'admin_password', array('class' => 'input-block-level', 'placeholder' => 'Password')) ?>
<span class="help-block error"><?php echo $form->error($model, 'admin_password'); ?></span>

<?php echo $form->labelEx($model, 'admin_email'); ?>
<?php echo $form->textField($model, 'admin_email', array('class' => 'input-block-level', 'placeholder' => 'email@address.com')) ?>
<span class="help-block error"><?php echo $form->error($model, 'admin_email'); ?></span>

<h5 class="text-center">Database</h5>
<?php echo $form->labelEx($model, 'database_host'); ?>
<?php echo $form->textField($model, 'database_host', array('class' => 'input-block-level', 'placeholder' => 'database host name')) ?>
<span class="help-block error"><?php echo $form->error($model, 'database_host'); ?></span>

<?php echo $form->labelEx($model, 'database_name'); ?>
<?php echo $form->textField($model, 'database_name', array('class' => 'input-block-level', 'placeholder' => 'database name')) ?>
<span class="help-block error"><?php echo $form->error($model, 'database_name'); ?></span>

<?php echo $form->labelEx($model, 'database_username'); ?>
<?php echo $form->textField($model, 'database_username', array('class' => 'input-block-level', 'placeholder' => 'database username')) ?>
<span class="help-block error"><?php echo $form->error($model, 'database_username'); ?></span>

<?php echo $form->labelEx($model, 'database_password'); ?>
<?php echo $form->passwordField($model, 'database_password', array('class' => 'input-block-level', 'placeholder' => 'database password')) ?>
<span class="help-block error"><?php echo $form->error($model, 'database_password'); ?></span>

<?php echo CHtml::submitButton('install', array('class' => 'btn btn-large btn-primary', 'style' => 'width:100%;')) ?>
<?php $this->endWidget() ?>